#!/bin/sh

if [[ $1 = "" ]]
then
    echo "please input ssh host";
    exit -1;
fi
#mvn clean install -Dmaven.test.skip -f ../office-commons/pom.xml

# install connect-backend
mvn clean install -Dmaven.test.skip -f pom.xml
# package connect-api
mvn clean package -Dmaven.test.skip -e
# scp to test server
    scp target/redis-0.0.1-SNAPSHOT.jar $1:/data/connect-redis
    ssh -t $1 "cd /data/connect-redis/;sleep 1;sudo sh run.sh  ;"


